package com.fengmi.sso.controller;


import com.fengmi.comm.ResultVO;
import com.fengmi.sso.SysUser;
import com.fengmi.sso.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 用户信息表 前端控制器
 * </p>
 *
 * @author sujie
 * @since 2022-11-28
 */
@RestController
@RequestMapping("/login")
public class SysUserController {
    @Autowired
    ISysUserService iSysUserService;

    @RequestMapping("login")
    public ResultVO login(@RequestBody  SysUser user) {
        return iSysUserService.login(user);
    }
    @RequestMapping("checkLogin")
    public ResultVO checkLogin(@RequestHeader("token") String token) {
        return  iSysUserService.checkLogin(token);
    }

}
